
import instance from "./api";

export function getStr() {
    return instance({
        url: "/str",
    })
}

export function getprepar(prepar) {
    return instance({
        url: "/getprepar",
        params:prepar
    })
}
export function getprepar1(prepar) {
    return instance({
        url: "/getprepar1",
        params:prepar
    })
}

export function delStr(id) {
    return instance({
        url: "/del?id" + id

    })
}

export function getList() {
    return instance({
        url: "/list"
    })
}

export function addPrepar(prepar) {
    return instance({
        url: "/addprepar",
        method:'post',
        data:prepar
    })
}

export function getNumber() {
    return instance({
        url: "/getNumber",
    })
}

export function editPrepar(prepar) {
    return instance({
        url: "/editprepar",
        method:'post',
        data:prepar
    })
}

export function editInstance(prepar) {
    return instance({
        url: "/editInstance",
        method:'post',
        data:prepar
    })
}
export function editAudit(prepar) {
    return instance({
        url: "/editaudit",
        method:'post',
        data:prepar
    })
}

export function del(id) {
    return instance({
        url: "/del",
        method:'post',
        data:{id:id}
    })
}
// 登录
export function Login2(data){
    return instance({
        url:'/userLogin',
        method:'post',
        data:data
    })
}


//获取学生信息
export function get_student(data){
    return instance({
        url:'/list_student',
        method:'get',
        params:data
    })
}
//获取班级信息
export function get_banji(data){
    return instance({
        url:'/list_banji',
        method:'get',
        params:data
    })
}
//获取老师信息
export function getTeacher(data){
    return instance({
        url:'/list',
        method:'get',
        params:data
    })
}

//添加学生
export function add_student(data){
    return instance({
        url:'/add_student',
        method:'post',
        data:data
    })
}
//添加班级
export function add_banji(data){
    return instance({
        url:'/add_banji',
        method:'post',
        data:data
    })
}
//添加老师
export function add_teacher(data){
    return instance({
        url:'/add',
        method:'post',
        data:data
    })
}
// 发送短信验证码接口
export function sendYZM(data){
    return instance({
        url:'/sendYzm',
        method:'post',
        data:data
    })
}
//修改学生
export function update_student(data){
    return instance({
        url:'/update_student',
        method:'post',
        data:data
    })
}
//修改班级
export function update_banji(data){
    return instance({
        url:'/update_banji',
        method:'post',
        data:data
    })
}
//修改老师
export function update_teacher(data){
    return instance({
        url:'/update',
        method:'post',
        data:data
    })
}

//删除学生
export function dele_student1(data){
    return instance({
        url:'/dele_student',
        method:'get',
        params:data
    })
}
//删除班级
export function dele_banji(data){
    return instance({
        url:'/dele_banji',
        method:'get',
        params:data
    })
}
//删除老师
export function dele_teacher(data){
    return instance({
        url:'/dele',
        method:'get',
        params:data
    })
}



export function findUser(data){
    return instance({
        url:'/findUser',
        params:{username:data}
    })
}


export function resetPassword(val,data){
    return instance({
        url:'/resetPassword',
        method:'post',
        data:{phone:val,newPassword:data}
    })
}


export function topic() {
    return instance({
        url: "/topic",
    })
}

export function get_iao(data) {
    return instance({
        url: "/as",
        params: data
    })
}
